//
//  PhtotoBrowserDemoViewController.swift
//  ZZUIDemo
//
//  Created by 张文晏 on 2018/12/26.
//  Copyright © 2018 Newcoretech. All rights reserved.
//

import UIKit
import ZZUI

class PhtotoBrowserDemoViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
    }
    let url = "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1545833140573&di=54d578968439a50894a25a25ffe24dae&imgtype=0&src=http%3A%2F%2Fcdn.duitang.com%2Fuploads%2Fitem%2F201408%2F13%2F20140813230138_AESYY.jpeg"
    @IBAction func showBtnAction(_ sender: Any) {
        SKPhotoBrowserOptions.enableSingleTapDismiss = true
        SKPhotoBrowserOptions.displayCloseButton = true
        let browser = SKPhotoBrowser(photos: [SKPhoto.photoWithImageURL(url)])
        browser.initializePageIndex(0)
        present(browser, animated: true, completion: nil)
    }
}
